home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / aspipat.zip / ASPI.DOC < prev    next >
Text File  |  1992-01-26  |  5KB  |  117 lines

  1. $Id: ASPI.DOC,v 1.1 1992/01/15 01:43:16 chris Exp $
  2.  
  3. A short explanation to the aspi - hack.  chris@alderan.sdata.de
  4. -------------------------------------------------------------------------
  5.  
  6. INSTALLATION:
  7. -------------
  8.  
  9. If you want to use the makefile you have to use a unix-compatible make
  10. (like nmake, etc.). There is also a special makefile for Microsoft's
  11. make: "makefile.msc".
  12.  
  13. Look at the makefile. There is a variable DEFAULT_TAPE_ID
  14. you might wish to change. This defines the scsi-host-adapter-number,
  15. the scsi-target-id and the logical-unit-number of the scsitape.
  16. E.g.:
  17.                                         DEFAULT_TAPE_ID="0:2:0"
  18.                                                          | | |
  19. adapter-num (0 if you just have 1 controller) -----------| | |
  20.                                                            | |
  21. scsi-target-id (0-7) --------------------------------------| |
  22.                                                              |
  23. logical-unit-number -----------------------------------------|
  24.  
  25. On most systems, you just have one host adapter, so the adapter-num
  26. will almost always be "0". The same is true for the logical unit number.
  27. All streamers support only logical unit number "0". Only the scsi-target
  28. ID depends on your scsi-setup. So, you will define DEFAULT_TAPE_ID to
  29. something like "0:2:0" or "0:4:0". If you don't define the variable
  30. then default "0:4:0" is compiled in as the default.
  31. You may also define the environment variable TAPEID (same syntax as
  32. DEFAULT_TAPE_ID). TAPEID overwrites at runtime your default setting.
  33. E.g. you may put a "TAPEID=0:3:0" in your autoexec.bat.
  34.  
  35. Now, say "make dosall" if you using a unix compatible make
  36. or "make makefile.msc" if you using microsoft's make to build
  37. tar.exe and ctctrl.exe
  38.  
  39. Adaptec's ASPI4DOS
  40. ------------------
  41. In order to run "tar" and "ctctrl" you will need to install adaptec's
  42. "ASPI4DOS.SYS". ASPI4DOS is a property program ov Adaptec and so
  43. it's sure not included in this distribution.
  44.  
  45.  
  46. RUNNING THE PROGRAMS:
  47. ----------------------
  48.  
  49. ctctrl:
  50. -------
  51.  
  52. ctctrl is a small tape control tool: say "ctctrl -?" to get the online-help
  53. to see what it does.
  54.  
  55. tar:
  56. ----
  57. Say tar +help to get the online help.
  58. There are two special archive file names.
  59. The filename "/dev/ct" specifies the cartridge-tape and "/dev/nrct"
  60. specifies the no-rewind-cartridge-tape (no rewind on close). I choose
  61. those names, because they unlikely to exist on an MSDOS filesystem
  62. and because I'm used to them from my ix386.
  63.  
  64. E.g.:
  65. tar -c c:/some/dir                - creates the tar-file "tar.out"
  66. tar -cf archive.tar c:/some/dir   - creates the tar-file "archive.tar"
  67. tar -cf /dev/ct c:/some/dir       - cretaes a tar-file on the scsi-tape
  68.                                     and rewinds the tape on close.
  69. tar -cf /dev/nrct c:/some/dir     - creates a tar-file on the scsi-tape
  70.                                     and does *not* rewind the tape on close
  71.  
  72. Too append one tar-file to the end of another just use the "/dev/nrct" device.
  73. E.g:  1) tar -cf /dev/nrct c:/some/dir
  74.       2) tar -cf /dev/ct d:/some/other/dir
  75.  
  76. Multi volume archives are now supported by the aspi-functions(). So, you
  77. may backup your whole disk in one GO to a multi volume tape archive.
  78. E.g.:  tar -cvMf /dev/ct c:/ d:/ e:/ f:/ writes your c:, d:, e: and
  79. f: - drive to the tape archive.
  80.  
  81. You might have noticed the use of "/" instead of "\" to separate dirnames
  82. in a pathname. So, don't use the backslash in pathnames, use the normal
  83. slash.
  84.  
  85. SOURCES
  86. -------
  87. First, the aspi-functions() come from a project I made for a customer.
  88. They usually build up a DLL (Dynamic Link Library) for WIN 3.
  89. So, I took a part of the source, removed all the Windows 3 specific
  90. stuff (memory allocation etc.) and made them compile without WIN3.
  91.  
  92. The import of the aspi-functions to gnu-tar-1.10 was fairly easy.
  93. In the headerfile "rmt.h" I changed all the defines for the
  94. io-functions. E.g.:
  95.  
  96. #define rmtcreat    aspicreat
  97. #define rmtopen     aspiopen
  98. #define rmtread     aspiread
  99. #define rmtwrite    aspiwrite
  100. #define rmtclose    aspiclose     .... etc.
  101. ... and that's really the only patch to the GNU-tar sources, I had to do,
  102. to import the aspi-functions(). :-)
  103.  
  104. aspicreat(), aspiopen(), aspiread() now just look if the archive-name
  105. is "/dev/ct" or "/dev/nrct" and if so, they calling the aspi-interface
  106. to perform the IO otherwise they just pass the request to creat(), open(),
  107. read(), write() .. etc.
  108.  
  109. Oh yeah, before I forget: I had to make some changes in diffarch.c to make
  110. the -d option work. The code there  mixes up "long" and "int" and does
  111. things like: "int_var = read(fileds, char_buf_pointer, long_count)" ?!@#*!!
  112. I made some type castings there, it's still not very nice, but it works.
  113.  
  114. So, that's all there is to it. If you have problems getting it to run,
  115. feel free to email me a note:  Email to chris@alderan.sdata.de
  116.  
  117.                              Chris